<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var arr = [1, 3, 4, 45, 34, 67];
    // console.log(arr.sort(function (a,b) {升序
    //         return a-b;
    // }));
    //console.log(arr.reverse())//掉换顺序

    // console.log(arr.concat(["hahah","jiehe"]));合并

    // arr.splice(3)删除，（3）起始值
    // arr.splice(4,5)

    // arr.splice(1,0,"hahahha","ooooo");插入
    // arr.splice(1,1,"hahahha","ooooo");替换

    //筛选
    // var f=arr.filter(function (item,index,array) {
    //     console.log("item:"+item);
    //     console.log("index:"+index);
    //     console.log("array:"+array);
    //     return item>4;
    // })
    // console.log(f);

    //map()方法
    // var m_ap=arr.map(function (item,index,array) {
    //    
    // })
    var pson = [{name: "张三", age: "45"}, {name: "小王", age: "34"}, {name: "安卓", age: "24"}, {name: "JAva", age: "12"}];

    var pname = [];
    var page = [];
    // var pmap = pson.map(function (item, index, array) {
    //     console.log(item.name);
    //     pname.push(array[index].name);
    //     page.push(array[index].age);
    //
    // });
    // console.log(pmap);
    // console.log(pname,page);
    var ff=pson.forEach(function (item,index) {
        pname.push(item.age);

    })
    console.log(pname);
</script>
</body>
</html>